#pragma once

#include "iapi.h"
class PRINTER_TYPE;
class RunGSPrinter
{
public:
	RunGSPrinter(void);
	~RunGSPrinter(void);

	BOOL Initialize();

	BOOL PrinterFile(LPSTR, LPSTR, int nWidth, int nHeight);
	BOOL PrinterFileToIjs(LPSTR lpFileName, LPSTR lpPrinter, PRINTER_TYPE*, LPSTR lpColorSpace, int nWidth, int nHeight);
private:
	BOOL GetPaperInfoFromFile(LPSTR);
	HMODULE m_hGSDll32;
	int m_nWidth;
	int m_nHeight;
	int m_nCopies;
	CString m_strFileName;
	char m_sIncludeFile[MAX_PATH*2];
	char m_sIjsServerFile[MAX_PATH];
	char m_sProfileOut[MAX_PATH+10];
	char dformat[64];
	char ddpi[64];

	PFN_gsapi_new_instance gsapi_new_instance;
	PFN_gsapi_delete_instance gsapi_delete_instance;
	PFN_gsapi_init_with_args gsapi_init_with_args;
	PFN_gsapi_exit gsapi_exit;
	PFN_gsapi_set_display_callback gsapi_set_display_callback;
	PFN_gsapi_set_stdio gsapi_set_stdio;
};
